package com.example.demojenkins.newserver.scheduled;

import com.example.demojenkins.newserver.utils.PushUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * Task 定时任务
 *
 * @author cws
 * @date 2022/8/22 21:42
 */
@EnableScheduling
@Configuration
public class Task {

    @Autowired
    private PushUtil pushUtil;
    // 定时任务
//    @Scheduled(cron = "${wechat.cron}")
    public void goodMorning() {
        pushUtil.push();
    }
}
